
import React, { useCallback, useMemo, useState } from 'react';
import {Link} from 'react-router-dom';
const DocList = (props) => {
  const [height, setHeight] = useState(0)
  const setshow = useCallback(() => {
    setHeight(height ? 0 : 'auto')
  }, [height])
  const { data } = props;
  
  return <div className="Customer-list-item-itembox" onClick={setshow}>
    <div className="Customer-list-item">
      <p className="p1">
        <span>姓名：{data.doctorName}</span>
<span>医院：{data.hospital}</span>
      </p>
      <p className="p1">
        <span>门诊量：{data.receptionAmount}</span>
        <span >参会总次数：<span className="color1">{
        data.countryMeetingTimes+
        data.areaMeetingTimes+
        data.cityMeetingTimes

        }</span></span>
      </p>
      <p className="p2">
        <span>浏览次数：{data.futureTimes}</span>
        <span>浏览时长：0</span>
      </p>
      {/* <p className="down">
        <img src={require('../../assests/img/down1.png')} alt=""/>
      </p> */}
    </div>
    <div className="Customer-list-item-b" style={{ height: height }} >
      {height != 0 &&
        <div className="item-b-inner" >
          <p>
          全国会参会次数：
          <Link to={`analysismettingList?doctorId=${data.doctorId}&meetingType=${0}`}>{data.countryMeetingTimes}</Link>
          </p>
          <p>
          区域会参会次数：
          <Link to={`analysismettingList?doctorId=${data.doctorId}&meetingType=${1}`}> {data.areaMeetingTimes}</Link>
          </p>
          <p>
          城市会参会次数：
          <Link to={`analysismettingList?doctorId=${data.doctorId}&meetingType=${2}`}>{data.cityMeetingTimes}</Link>
          </p>
        </div>
      }

    </div>
  </div>

}

export default DocList